package com.itqf.jsonSerializer;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

/**
 * 作者:高少东
 * 项目名:  product_gsd
 * 时间: 2019/12/20 10:45
 * 描述:
 */

public class ProPutawaySerializer extends JsonSerializer<Integer> {

    @Override
    public void serialize(Integer integer, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {

        String aa="否";

        if (integer==0){

            aa="是";
        }

        jsonGenerator.writeString(aa);
    }
}
